<br />

<?php
if ($session->check('Message.auth')) {
	echo $session->flash('auth');
}
?>

<div class="form">
<?php
	echo $this->Form->create(
		'User',
		array(
			'url' => array(
				'admin' => false,
				'plugin' => null,
				'controller' => 'users',
				'action' => 'login'
			),
			'id' => 'loginPageUserAddForm'
		)
	);
?>

<fieldset>
	<legend>
		<?php echo __d('', 'Вход', true); ?>
	</legend>
	<?php
		echo $this->Form->input(
			'username',
			array(
				'label' => false,
				'div' => false,
				'size' => 25,
				'value' => 'потребителско име',
				'onblur' => 'addText(this);',
				'onfocus' => 'clearText(this);',
				'id' => 'loginPageUserUsername'
			)
		);
		
		echo '
		<br />
		';
		
		echo $this->Form->input(
			'password',
			array(
				'label' => false,
				'div' => false,
				'size' => 25,
				'value' => 'парола',
				'onblur' => 'addText(this);',
				'onfocus' => 'clearText(this);',
				'id' => 'loginPageUserPassword'
			)
		);
		
		if(Configure::read('MyApp_Users.Settings.captcha_login')) {
			echo $this->element('users_captchaBox');
		}
		
		echo '<br /><br />';
		
		if(Configure::read('MyApp_Users.Settings.rememberMe_isActive')) {
			echo $this->Form->input(
				'remember_me',
				array(
					'label' => __d('', 'Запомни ме', true),
					'div' => false,
					'type' => 'checkbox',
					'id' => 'loginPageUserRememberMe'
				)
			);
		}
		
		echo '
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		';
		
		echo $this->Form->end(array(
			'label' => __d('', 'Вход', true),
			'div' => false
		));
		
		echo '<br />';
		
		if(Configure::read('MyApp_Users.Settings.userForgottenPassword')) {
			echo $this->Html->link(
				__d('', 'Забравена парола', true).'?',
				array(
					'admin' => false,
					'plugin' => null,
					'controller' => 'users',
					'action' => 'account_recover'
				)
			);
		}
		
		echo '<br />';
		
		if(Configure::read('MyApp_Users.Settings.userRegistration')) {
			echo $this->Html->link(
				__d('', 'Безплатна регистрация', true),
				array(
					'admin' => false,
					'plugin' => null,
					'controller' => 'users',
					'action' => 'register'
				)
			);
		}
	?>
	</fieldset>
</div>